﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/main/AdminBase.Master" AutoEventWireup="true" CodeBehind="list_staff.aspx.cs" Inherits="Com.Ompchina.Web.admin.system.list_staff" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="Model.AuthModel" %>
<%@ Import Namespace="Com.Ompchina.Lib.Text" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph_header" runat="server">
<script type="text/javascript">
    $(function () {
        Init.tableList(".list");
    })
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_pagename" runat="server">
    权限配置 &gt; 成员列表
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cph_pagelink" runat="server">
    <li><a href="add_staff.aspx?action=add">新增成员</a></li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cph_main" runat="server">
<form id="frm_listStaff" runat="server">
<table class="table list" cellpadding="0" cellspacing="0">
    <tr>
        <th>搜索条件：</th>
    	<td class="item"> 
    	    关键字：<asp:TextBox ID="txtKey" runat="server" CssClass="ipttxt w180 h20"></asp:TextBox>&nbsp;&nbsp;
            <asp:Button ID="btnSearch" runat="server" Text="过滤" onclick="btnSearch_Click" />
    	</td>
    </tr>
</table>
</form>
<br /><br />
<table class="table list" cellpadding="0" cellspacing="0">
	<tr>
	    <th>成员名称</th>
    	<th>成员邮箱</th>
        <th class="w100">锁定状态</th>
        <th class="w180">最后登录</th>
        <th class="w180">登录记录</th>
        <th class="w180">最后操作</th>
        <th class="w180">操作记录</th>
        <th class="center w100">操作</th>
    </tr>
    <%
        int recordCount = 0, pageSize = 20;
        IList<StaffInfo> list = this._GetStaff(pageSize, out recordCount);
        if (list != null && list.Count > 0) 
        {            
            foreach (StaffInfo info in list) 
            {
                %>
                <tr>
                    <td><%= info.Username %></td>
                    <td><%= info.Email%></td>
                    <td><%= info.IsLock.Equals("y") ? "锁定" : "开放"%></td>
                    <td><%= info.LastLogin %></td>
                    <td><a href="list_stafflogin.aspx?action=list&sid=<%= info.StaffID %>">查看</a></td>
                    <td><%= info.LastAccess %></td>
                    <td><a href="list_staffaccess.aspx?action=list&sid=<%= info.StaffID %>">查看</a></td>
                    <td class="center"><a href="add_staff.aspx?action=update&id=<%= info.StaffID %>">修改</a></td>
                </tr>
                <%
            }
        }
    %>
    <tr>
        <th colspan="8" class="pager">
            <%
                Pager.ResponsePager(Response, Request.Url.AbsolutePath
                    , "action=list" + base.GetQueryString()
                    , true, true, true, true, PageIndex, pageSize, recordCount, 5); %>
            总记录：<%= recordCount %>，当前第<%= PageIndex %>页
       </th>
    </tr>
</table>
</asp:Content>
